function Circle(x, y, r)
{
  this.x = x;
  this.y = y;
  this.r = r;
}

function area(c)
{
  return Math.PI * c.r * c.r;
}

Circle.prototype.surface =
  function ()
  {
    return 2 * Math.PI * this.r;
  }

var c1 = {x:10, y:20, r:30};
var c2 = new Circle(30, -5, 10); 
var c3 = new Circle(50, 50, 20);
area(c1)
c2.surface()
area(c3)
c3.surface()